/**
 * Created by cchen on 2015/4/16.
 */

var Schema = mongoose.Schema;


var shareAppNameSchema = new Schema({
    appName: {type: String, enum: ['wx']},
    appURL: String,
    imageURL: String
});
mongoose.model('mobile_app_shareAppName_restful', shareAppNameSchema, 'mobile_app_shareAppName_restful');


var userSharesMongoSchema = new Schema({
    userId: {type: Schema.Types.ObjectId, ref: 'user'},
    feedsType: String,
    feedsId: String,
    uuid: String,
    os: String,
    dateCreated: {type: Date, default: Date.now},
    dateLastModified: {type: Date, default: Date.now},
    shareTo: String,
    numberOfClick: {type: Number, min: 0}
});
mongoose.model('mobile_app_user_share_restful', userSharesMongoSchema, 'mobile_app_user_share_restful');

var shareContent = new Schema({
    key: String,              //关键字 标识专题、活动、或者其他h5页面的关键字
    title: String,
    desc: String,
    image: String,
    url: String,
    dateCreated: {type: Date, default: Date.now}
});
mongoose.model('mobile_app_share_content', shareContent, 'mobile_app_share_content');


